Carbon


GetThemeButtonBackgroundBounds

Header: Appearance.h Carbon status: Supported

Obtains the rectangle that contains a button.

OSStatus GetThemeButtonBackgroundBounds (
    const Rect *inBounds, 
    ThemeButtonKind inKind, 
    const ThemeButtonDrawInfo *inDrawInfo, 
    Rect *outBounds
);
inBounds

A pointer to a structure of type Rect. Before calling GetThemeButtonBackgroundBounds, set the rectangle to the boundary of the button without any adornments, in local coordinates.

inKind

A value of type ThemeButtonKind. Pass a constant specifying the type of button being examined. See “Theme Button Kind Constants” for descriptions of possible values.

inDrawInfo

A pointer to a structure of type ThemeButtonDrawInfo. Before calling GetThemeButtonBackgroundBounds, set the structure to contain the state, value, and adornment for the button.

outBounds

A pointer to a structure of type Rect. On return, the rectangle contains the actual boundary of the button, including any adornments, in local coordinates.

function result

A result code.

DISCUSSION

Appearance adornments can extend beyond the basic bounding rectangle of a button and may be of variable shape. Your application may call the GetThemeButtonBackgroundBounds function to obtain the actual rectangle containing the pixels belonging to a button under the current theme.

VERSION NOTES

This function is available with Appearance Manager 1.1 and later.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)